package routers

import (
	"github.com/gin-contrib/cors"
	"github.com/gin-gonic/gin"
	"inspect/hars"
)

func Init() *gin.Engine {
	r := gin.Default()
	r.Use(cors.Default())
	r.Static("/static", "./static")
	r.GET("/list", hars.List)
	r.POST("/add", hars.Add)

	r.GET("/del", hars.Del)

	return r
}
